home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-3488 / macros / demo5.aim < prev    next >
Text File  |  1990-10-13  |  540b  |  20 lines

  1. * example of shading correction by subtraction of
  2. * the background.
  3. * background is calculated by maxmin filtering
  4. *
  5. ton                 * timer on
  6. readf scheme,A      * read image
  7. * thresholding is not possible
  8. * with uncorrected image:
  9. thresh A,B,1        
  10. * calculate the background by
  11. * maxmin filtering
  12. lmax A,B,31         * max filter
  13. lmin B,B,31         * min filter
  14. sub A,B,255         * subtract background
  15. * obtain from the corrected image
  16. * a binary image by thresholding
  17. thresh B,B,1,220    * threshold
  18. toff
  19.  
  20.